﻿<?xml version="1.0" encoding="UTF-8"?>
<!--<http://www.w3.org/1999/XSL/Formatxsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:template match="/">
    	<html>
			<xsl:apply-templates select="application-body"/>
		</html>
</xsl:template>

	<!--////////////////////////////////////////////////-->
	<xsl:template match="application-body">
		<table border="0" width="800">
			<tr>
				<td align="left" valign="top"  style="word-break:  keep-all">
					<xsl:apply-templates select="description"/>
					<xsl:apply-templates select="drawings"/>
					<xsl:apply-templates select="claims"/>
				</td>
			</tr>
		</table>
	</xsl:template>
	<xsl:template match="description">
		<tr>
			<td  style="word-break:  keep-all">
				<xsl:apply-templates select="invention-title | technical-field | background-art | description-of-drawings | disclosure | mode-for-invention | best-mode | p | dp | img | comment() "/>
			</td>
		</tr>
		<!--<xsl:apply-templates select="p | description/dp"/>-->
	</xsl:template>
	<xsl:template match="technical-field">
		<xsl:apply-templates/>
	</xsl:template>
	<xsl:template match="technical-field/p">
		<table width="800" border="0">
			<tr>
				<td  style="word-break:  keep-all">
					<font face="仿宋" size="4" color="red">
						<script language="JavaScript">
 							document.write("&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;");
						</script>
						<xsl:apply-templates/>
					</font>
				</td>
			</tr>
		</table>
	</xsl:template>
	<xsl:template match="background-art">
		<xsl:apply-templates/>
	</xsl:template>
	<xsl:template match="background-art/p">
		<table width="800" border="0">
			<tr>
				<td  style="word-break:  keep-all">
					<font face="仿宋" size="4" color="blue">
						<script language="JavaScript">
 							document.write("&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;");
						</script>
						<xsl:apply-templates/>
					</font>
				</td>
			</tr>
		</table>
	</xsl:template>
	<xsl:template match="description-of-drawings">
		<xsl:apply-templates/>
	</xsl:template>
	<xsl:template match="description-of-drawings/p">
		<table width="800" border="0">
			<tr>
				<td  style="word-break:  keep-all">
					<font face="仿宋" size="4" color="green">
						<script language="JavaScript">
 							document.write("&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;");
						</script>
						<xsl:apply-templates/>
					</font>
				</td>
			</tr>
		</table>
	</xsl:template>
	<xsl:template match="disclosure">
		<xsl:apply-templates/>
	</xsl:template>
	<xsl:template match="disclosure/p">
		<table width="800" border="0">
			<tr>
				<td  style="word-break:  keep-all">
					<font face="仿宋" size="4" color="gray">
						<script language="JavaScript">
 							document.write("&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;");
						</script>
						<xsl:apply-templates/>
					</font>
				</td>
			</tr>
		</table>
	</xsl:template>
	<xsl:template match="best-mode">
		<xsl:apply-templates/>
	</xsl:template>
  
	<xsl:template match="mode-for-invention">
		<xsl:apply-templates/>
	</xsl:template>
  
		<xsl:template match="mode-for-invention/p">
		<table width="800" border="0">
			<tr>
				<td  style="word-break:  keep-all">
					<font face="仿宋" size="4" color="Purple">
						<script language="JavaScript">
 							document.write("&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;");
						</script>
						<xsl:apply-templates/>
					</font>
				</td>
			</tr>
		</table>
	</xsl:template>

		<xsl:template match="best-mode/p">
		<table width="800" border="0">
			<tr>
				<td  style="word-break:  keep-all">
					<font face="仿宋" size="4" color="Purple">
						<script language="JavaScript">
 							document.write("&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;");
						</script>
						<xsl:apply-templates/>
					</font>
				</td>
			</tr>
		</table>
	</xsl:template>
	<xsl:template match="claims">
		<table cellpadding="0" cellspacing="0" border="0" width="800">
			<tr>
				<td align="center"  style="word-break:  keep-all">
					<font face="仿宋" size="5">
						权利要求书
					</font>
				</td>
			</tr>
			<tr>
				<xsl:apply-templates select="claim/claim-text|claim/dp|claim/comment()|comment()"/>
			</tr>
		</table>
	</xsl:template>
	<xsl:template match="drawings">
		<br/>
		<table width="800" border="0">
			<tr>
				<td align="left"  style="word-break:  keep-all">
					<xsl:apply-templates select=" p | figure/img  | dp | maths | comment()"/>
				</td>
			</tr>
		</table>
	</xsl:template>
	<xsl:template match="invention-title">
		<table width="520">
			<tr>
				<td align="center"  style="word-break:  keep-all">
					<font face="仿宋" size="5" color="Purple">
						<xsl:copy>
							<xsl:apply-templates select="* | text() | br | sub | sup "/>
						</xsl:copy>
					</font>
				</td>
			</tr>
		</table>
	</xsl:template>
	<xsl:template match="description/invention-title">
		<table width="520">
			<tr>
				<td align="center"  style="word-break:  keep-all">
					<font face="仿宋" size="5" color="Purple">
						<xsl:copy>
							<xsl:apply-templates select="* | text() | br | sub | sup "/>
						</xsl:copy>
					</font>
				</td>
			</tr>
		</table>
		<br/>
		<br/>
	</xsl:template>
	<xsl:template match="p">
		<table width="800" border="0">
			<tr>
				<td style="word-break:  keep-all">
					<font face="仿宋" size="4">
						<script language="JavaScript">
 							document.write("&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;");
						</script>
						<xsl:apply-templates/>
					</font>
				</td>
			</tr>
		</table>
	</xsl:template>
	<xsl:template match="pre">
		<pre>
			<copy>
				<xsl:value-of select="."/>
			</copy>
		</pre>
	</xsl:template>
	<xsl:template match="claim-text">
		<table width="800" border="0">
			<tr>
				<td  style="word-break:  keep-all">
					<font face="仿宋" size="4">
						<script language="JavaScript">
 							document.write("&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;");
						</script>
						<xsl:apply-templates/>
					</font>
				</td>
			</tr>
		</table>
	</xsl:template>
	<xsl:template match="tables">
		<xsl:apply-templates/>
	</xsl:template>
	<xsl:template match="table">
		<table face="仿宋" size="4">
			<xsl:attribute name="align"><xsl:value-of select="@align"/></xsl:attribute>
			<xsl:attribute name="width"><xsl:value-of select="@pgwide"/></xsl:attribute>
			<xsl:attribute name="cellspacing"><xsl:value-of select="@cellspacing"/></xsl:attribute>
			<xsl:attribute name="border"><xsl:value-of select="@border"/></xsl:attribute>
			<xsl:attribute name="frame"><xsl:value-of select="@frame"/></xsl:attribute>
			<xsl:apply-templates/>
		</table>
	</xsl:template>
	<xsl:template match="tgroup">
		<xsl:apply-templates/>
	</xsl:template>
	<xsl:template match="colspec">
		<xsl:apply-templates/>
	</xsl:template>
	<xsl:template match="thead">
		<xsl:apply-templates/>
	</xsl:template>
	<xsl:template match="tbody">
		<xsl:apply-templates/>
	</xsl:template>
	<xsl:template match="row">
		<tr>
			<xsl:attribute name="valign"><xsl:value-of select="@valign"/></xsl:attribute>
			<xsl:attribute name="align"><xsl:value-of select="@align"/></xsl:attribute>
			<xsl:apply-templates/>
		</tr>
	</xsl:template>
	<xsl:template match="entry">
		<script language="JavaScript" type="text/javascript">
			var morerows = <xsl:value-of select="@morerows"/>;
			var namest = "<xsl:value-of select="@namest"/>";
			var nameend = "<xsl:value-of select="@nameend"/>";
			
			var rowspan = "";
			var colspan = "";
			
			if(morerows > 1)
			{
				rowspan = "rowspan="+morerows;
			}
			
			if(namest != null &amp;&amp; nameend != null)
			{
				var start = namest.substring(1);
				var end = nameend.substring(1);
				var gap = end - start + 1;
				colspan = "colspan="+gap;
			}
			var td = "&lt;td" + " " + rowspan + " " + colspan + "&gt;";
			document.write(td);
		</script>
		<xsl:attribute name="valign"><xsl:value-of select="@valign"/></xsl:attribute>
		<xsl:attribute name="align"><xsl:value-of select="@align"/></xsl:attribute>
		<xsl:apply-templates/>
		<script language="JavaScript" type="text/javascript">
			<xsl:if test="not(text())">
				document.write("&amp;nbsp;");
			</xsl:if>
			document.write("&lt;/td&gt;");
		</script>
	</xsl:template>
	<xsl:template match="p//br | br">
		<br/>
	</xsl:template>
	<xsl:template match="chem">
		<iframe src="{@file}" marginheight="0" marginwidth="0" frameborder="0" scrolling="no" height="30" width="400"/>
	</xsl:template>
	<xsl:template match="maths">
		<applet code="webeq3.ViewerControl.class" archive="../../../../../applet/WebEQApplet.jar" height="100" width="600">
			<PARAM NAME="eq">
				<xsl:attribute name="VALUE"><xsl:value-of select="."/></xsl:attribute>
			</PARAM>
		</applet>
	</xsl:template>
	<xsl:template match="cml">
		<xsl:apply-templates select="reaction|formula|molecule"/>
	</xsl:template>
	<xsl:template match="reaction|formula|molecule">
		<font face="仿宋" size="2">
			<xsl:apply-templates select="text()|sb|sp|img|chf"/>
		</font>
	</xsl:template>
	<xsl:template match="text()">
		<xsl:value-of select="."/>
	</xsl:template>
	<xsl:template match="subscript">
		<sub>
			<font face="仿宋" size="-1">
				<copy>
					<xsl:apply-templates select="* |text()|subscript|superscript"/>
				</copy>
			</font>
		</sub>
	</xsl:template>
	<xsl:template match="superscript">
		<sup>
			<font face="仿宋" size="-1">
				<copy>
					<xsl:apply-templates select="* |text()|subscript|superscript"/>
				</copy>
			</font>
		</sup>
	</xsl:template>
	<xsl:template match="b">
		<b>
			<copy>
				<xsl:apply-templates select="* |text()"/>
			</copy>
		</b>
	</xsl:template>
	<xsl:template match="i">
		<i>
			<copy>
				<xsl:apply-templates select="* |text()"/>
			</copy>
		</i>
	</xsl:template>
	<xsl:template match="u">
		<u>
			<copy>
				<xsl:apply-templates select="* |text()"/>
			</copy>
		</u>
	</xsl:template>
	<!--<xsl:template match="overscore">
		<span style="text-decoration : overline">
			<copy>
				<xsl:apply-templates select="* |text()"/>
			</copy>
		</span>
	</xsl:template>
	-->
	<xsl:template match="comment()">
 
	  <xsl:choose>
	  	<xsl:when test="contains(.,'SIPO')">
			<br/>
			<br/>
			<center>--&#160;
		<script language="JavaScript" type="text/javascript">
			var pageinfo = '<xsl:value-of select="substring(.,14)"/>';
			var end = pageinfo.indexOf('"');
			var num = pageinfo.substring(0,end);
			document.write(num);
		</script>
		&#160;--</center>
			<br/>
			<br/>
		</xsl:when>
 
			<xsl:when test="contains(.,'no marking')">
 
						<font face="宋体" size="9" color="red">

								&lt;标记未做五项标引&gt; 
						</font>	
			</xsl:when>	
			<xsl:when test="contains(.,'part marking')">
 
						<font face="宋体" size="9" color="blue">

								&lt;部分五项标引&gt; 
						</font>	
			</xsl:when>				
			</xsl:choose>
	</xsl:template>
	<xsl:template match="dp">
		<table width="550">
			<tr>
				<td>
					<br/>
				</td>
			</tr>
			<tr>
				<td valign="bottom">
					<center>- 
					<script language="JavaScript">
						var nstr="<xsl:value-of select="@n"/>";
						nstr=nstr.substr(1);
						document.write(nstr);
					</script>
				-</center>
				</td>
			</tr>
			<tr>
				<td>
					<hr/>
					<hr/>
					<br/>
				</td>
			</tr>
		</table>
	</xsl:template>
	<!--xsl:template match="figure/img">
		<object classid="CLSID:106E49CF-797A-11D2-81A2-00E02C015623">
			<xsl:attribute name="width"><xsl:value-of select="@wi"/></xsl:attribute>
			<xsl:attribute name="height"><xsl:value-of select="@he"/></xsl:attribute>
			<param name="src">
				<xsl:attribute name="value"><xsl:value-of select="@file"/></xsl:attribute>
			</param>
			<param name="negative" value="no"/>
			<embed type="image/tiff" negative="no">
				<xsl:attribute name="width"><xsl:value-of select="@wi"/></xsl:attribute>
				<xsl:attribute name="height"><xsl:value-of select="@he"/></xsl:attribute>
				<xsl:attribute name="src"><xsl:value-of select="@file"/></xsl:attribute>
			</embed>
		</object>
		<br/>
 
		<xsl:value-of select="../@figure-labels"/>
		<br/> 
 	</xsl:template-->
	<xsl:template match="img">
		<image>
			<xsl:attribute name="width">
				<xsl:value-of select="@wi"/>
			</xsl:attribute>
			<xsl:attribute name="height">
				<xsl:value-of select="@he"/>
			</xsl:attribute>
			<xsl:attribute name="src">
				<xsl:value-of select="@file"/>
			</xsl:attribute>
		</image>
	</xsl:template>
	<!--xsl:template match="img">
		<object classid="CLSID:106E49CF-797A-11D2-81A2-00E02C015623">
			<xsl:attribute name="width"><xsl:value-of select="@wi"/></xsl:attribute>
			<xsl:attribute name="height"><xsl:value-of select="@he"/></xsl:attribute>
			<param name="src">
				<xsl:attribute name="value"><xsl:value-of select="@file"/></xsl:attribute>
			</param>
			<param name="negative" value="no"/>
			<embed type="image/tiff" negative="no">
				<xsl:attribute name="width"><xsl:value-of select="@wi"/></xsl:attribute>
				<xsl:attribute name="height"><xsl:value-of select="@he"/></xsl:attribute>
				<xsl:attribute name="src"><xsl:value-of select="@file"/></xsl:attribute>
			</embed>
		</object>
	</xsl:template-->
	<xsl:template match="sb">
		<sub>
			<copy>
				<xsl:apply-templates select="* |text()"/>
			</copy>
		</sub>
	</xsl:template>
	<xsl:template match="sub">
		<sub>
			<copy>
				<xsl:apply-templates select="* |text()"/>
			</copy>
		</sub>
	</xsl:template>
	<xsl:template match="sp">
		<sup>
			<font face="宋体" size="-1">
				<xsl:apply-templates select="* |text()"/>
			</font>
		</sup>
	</xsl:template>
	<xsl:template match="sup">
		<sup>
			<font face="宋体" size="-1">
				<xsl:apply-templates select="* |text()"/>
			</font>
		</sup>
	</xsl:template>
	<xsl:template match="chf">
		<APPLET>
			<xsl:attribute name="CODEBASE">"."</xsl:attribute>
			<xsl:attribute name="CODE">cml.class</xsl:attribute>
			<xsl:attribute name="name">"testApplet"</xsl:attribute>
			<xsl:attribute name="HSPACE">0</xsl:attribute>
			<xsl:attribute name="VSPACE">0</xsl:attribute>
			<xsl:attribute name="HEIGHT"><xsl:value-of select="@height"/></xsl:attribute>
			<xsl:attribute name="WIDTH"><xsl:value-of select="@width"/></xsl:attribute>
			<xsl:attribute name="ALIGN"><xsl:value-of select="@align"/></xsl:attribute>
			<PARAM NAME="HEIGHT">
				<xsl:attribute name="VALUE"><xsl:value-of select="@height"/></xsl:attribute>
			</PARAM>
			<PARAM NAME="WIDTH">
				<xsl:attribute name="VALUE"><xsl:value-of select="@width"/></xsl:attribute>
			</PARAM>
			<PARAM NAME="ARROWTYPE">
				<xsl:attribute name="VALUE"><xsl:value-of select="@arrowtype"/></xsl:attribute>
			</PARAM>
			<PARAM NAME="UPPER">
				<xsl:attribute name="VALUE"><xsl:value-of select="upper"/></xsl:attribute>
			</PARAM>
			<PARAM NAME="LOWER">
				<xsl:attribute name="VALUE"><xsl:value-of select="lower"/></xsl:attribute>
			</PARAM>
			<PARAM NAME="ALIGN">
				<xsl:attribute name="VALUE"><xsl:value-of select="align"/></xsl:attribute>
			</PARAM>
		</APPLET>
	</xsl:template>
</xsl:stylesheet>
